package a01;

/**
 * @author Sven Eric Panitz
 */
import javax.swing.JPanel;

public class PaintableImage extends JPanel implements Paintable {

    private static final long serialVersionUID = 1L;
    MyImage mi;

    public PaintableImage(MyImage mi) {
	this.mi = mi;
    }

    public PaintableImage(String name) {
	this.mi = new MyImage(name);
    }

    public void paintTo(java.awt.Graphics g) {
	g.drawImage(mi.get(), 0, 0, this);
    }
}
